package cn;

import cn.NewsDao.NewsDao1;
import cn.NewsDaoImpl.NewsDaoImpl1;
import cn.NewsDaoImpl.NewsDaoImpl2;
import cn.NewsDaoImpl.NewsDaoImpl3;
import cn.NewsDaoImpl.NewsDaoImpl4;
import cn.NewsService.NewsService;
import cn.NewsService.NewsService1;
import cn.NewsServiceImpl.NewsServiceImpl;
import cn.NewsServiceImpl.NewsServiceImpl1;
import cn.entity.News1;
import cn.entity.News2;
import cn.entity.News3;
import cn.entity.News4;


import java.util.List;

public class Text1 {
    public static void main(String[] args) {
       /* NewsDaoImpl1 newsDao=new NewsDaoImpl1();
        List<News1> newsList=newsDao.getNewsList();
        for(News1 news:newsList){
            System.out.println(news.getId()+"\t"+news.getTitle()+"\t"+news.getSummary()+"\t"+news.getContent()+"\t"+news.getAuthor()+"\t"+news.getCreateDate());
        }*/


        /*NewsDaoImpl2 newsDao=new NewsDaoImpl2();
        List<News2> newsList=newsDao.getNewsList();
        for(News2 news:newsList){
            System.out.println(news.getId()+"\t"+news.getName()+"\t"+news.getCreateDate());
        }*/


       /* NewsDaoImpl3 newsDao=new NewsDaoImpl3();
        List<News3> newsList=newsDao.getNewsList();
        for(News3 news:newsList){
            System.out.println(news.getId()+"\t"+news.getNewsId() + "\t" +"\t"+news.getContent()+"\t"+news.getAuthor()+"\t"+news.getIp() +"\t" +news.getCreateDate());
        }
*/


       /* NewsDaoImpl4 newsDao=new NewsDaoImpl4();
        List<News4> newsList=newsDao.getNewsList();
        for(News4 news:newsList){
            System.out.println(news.getId()+"\t"+news.getUserName()+"\t"+news.getPassword()+"\t"+news.getEmail()+"\t"+news.getUserType()+"\t");
        }*/



       /* NewsDaoImpl1 newsDao=new NewsDaoImpl1();
        List<News1> newsList=newsDao.getNewsList();
        for(News1 news:newsList){
            System.out.println(news.getId()+"\t"+news.getTitle()+"\t");
        }*/


       /* NewsDaoImpl1 newsDao1 = new NewsDaoImpl1();
        News1 news = new News1();
        news.setCategoryId(2);
        news.setTitle("无卡");

        newsDao1.add(news);*/


        /*NewsService1 newsService = new NewsServiceImpl1();
        List<News1> newsList = newsService.getNewsList1();
        for(News1 news:newsList){
            System.out.println(news.getId()+"\t"+"\t" +news.getCategoryId()+"\t" + news.getTitle()+"\t"+news.getSummary()+"\t"+news.getContent()+"\t"+news.getAuthor()+"\t"+news.getCreateDate());
        }*/


        NewsService1 newsService = new NewsServiceImpl1();
        List<News1> newsList = newsService.getNewsList1();
        for(News1 news:newsList){
            System.out.println(news.getId()+"\t"+"\t" +news.getCategoryId()+"\t" + news.getTitle()+"\t"+news.getSummary()+"\t"+news.getContent()+"\t"+news.getAuthor()+"\t"+news.getCreateDate());
        }

    }
}
